package com.hub.realtime.common.enums;

import java.io.Serializable;

public enum BuildState implements Serializable {

    /**
     * 待构建
     */
    NORMAL(0),

    /**
     * 构建中
     */
    BUILDING(1),

    /**
     * 已取消
     */
    CANCEL(2),


    /**
     * 构建成功
     */
    SUCCESS(3),

    /***
     * 构建失败
     */
    FAILED(-1);

    int value;

    BuildState(int value) {
        this.value = value;
    }

    public static BuildState of(Integer state) {
        for (BuildState v : values()) {
            if (v.value == state) {
                return v;
            }
        }
        return null;
    }

    public Long getType() {
        return  (long)value;
    }

}


